from sudoku import PySudoku

easy = [
    #        |        |
    [0, 0, 0, 0, 4, 0, 0, 0, 0],
    [0, 3, 0, 0, 1, 7, 9, 0, 0],
    [1, 9, 0, 3, 0, 0, 0, 4, 2],
    #--------------------------
    [0, 2, 0, 6, 3, 4, 0, 0, 8],
    [0, 5, 0, 2, 8, 1, 0, 7, 0],
    [3, 0, 0, 7, 5, 9, 0, 1, 0],
    #--------------------------
    [2, 1, 0, 0, 0, 3, 0, 8, 4],
    [0, 0, 4, 1, 7, 0, 0, 2, 0],
    [0, 0, 0, 0, 2, 0, 0, 0, 0],
    #        |        |
    ]

medium = [
    #        |        |
    [0, 0, 0, 7, 0, 0, 0, 1, 0],
    [0, 0, 0, 0, 2, 0, 8, 0, 3],
    [0, 2, 0, 9, 0, 0, 0, 0, 5],
    #--------------------------
    [5, 0, 0, 3, 0, 0, 2, 0, 0],
    [1, 8, 0, 0, 7, 0, 0, 4, 6],
    [0, 0, 2, 0, 0, 6, 0, 0, 1],
    #--------------------------
    [8, 0, 0, 0, 0, 7, 0, 5, 0],
    [4, 0, 7, 0, 9, 0, 0, 0, 0],
    [0, 5, 0, 0, 0, 4, 0, 0, 0],
    #        |        |
    ]

hard = [
    #        |        |
    [0, 8, 0, 0, 0, 5, 0, 9, 0],
    [0, 0, 7, 4, 2, 0, 0, 0, 3],
    [0, 3, 0, 0, 0, 0, 0, 0, 1],
    #--------------------------
    [0, 0, 9, 0, 0, 0, 5, 0, 0],
    [0, 5, 6, 0, 4, 0, 1, 8, 0],
    [0, 0, 4, 0, 0, 0, 9, 0, 0],
    #--------------------------
    [7, 0, 0, 0, 0, 0, 0, 2, 0],
    [2, 0, 0, 0, 1, 8, 4, 0, 0],
    [0, 4, 0, 9, 0, 0, 0, 1, 0],
    #        |        |
    ]

hardest = [
    #        |        |
    [0, 5, 0, 0, 0, 9, 8, 0, 6],
    [0, 0, 0, 0, 0, 0, 0, 0, 0],
    [7, 0, 0, 8, 0, 0, 4, 9, 2],
    #--------------------------
    [4, 9, 0, 0, 0, 2, 0, 0, 3],
    [0, 3, 0, 0, 0, 0, 0, 2, 0],
    [8, 0, 0, 3, 0, 7, 0, 4, 5],
    #--------------------------
    [5, 8, 3, 0, 0, 1, 0, 0, 7],
    [0, 0, 0, 0, 0, 0, 0, 0, 0],
    [6, 0, 1, 7, 0, 0, 0, 3, 0],
    #        |        |
    ]


if __name__ == "__main__":
    for schema in (easy, medium, hard, hardest):
        s = PySudoku(schema)
        print s
        print "Solved with %i guesses" % s.tries
